//
//  CatalogueElement.m
//  AOEProject
//
//  Created by techplus on 9/21/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "CatalogueElement.h"
#import "Match.h"
#import "AOE_XML_Parser.h"

@implementation CatalogueElement
@synthesize atrName;
@synthesize matchs;
@synthesize  TAG_CATALOG_INDEX;
@synthesize TAG_CATALOG_ELEMENT_INDEX;

-(id)initWithCatalogIndexAndCEIndex:(NSInteger *)cIndex :(NSInteger *)ceIndex{
    self = [super init];
    if(self)
    {
        self.TAG_CATALOG_INDEX = cIndex;
        self.TAG_CATALOG_ELEMENT_INDEX = ceIndex;
    }
    return self;
}

-(void)getAtrs{
    //SAMPLE DATA
    //atrName = [[NSString alloc]initWithFormat:@"C %dCe %d",TAG_CATALOG_INDEX,TAG_CATALOG_ELEMENT_INDEX];
}

-(void)getMatchs{
    
    self.matchs = [[NSMutableArray alloc] initWithArray:[[AOE_XML_Parser getInstance]getMatchElementList:TAG_CATALOG_INDEX :TAG_CATALOG_ELEMENT_INDEX]];
    
    //GET SAMPLE DATA
    /*for(int i  = 0; i <10; i++)
    {
        Match *m = [[Match alloc]initWithCatalogIndex:TAG_CATALOG_INDEX ceIndex:TAG_CATALOG_ELEMENT_INDEX matchIndex:(NSInteger *)i];
        [matchs addObject:m];
        [m release];
    }*/
    
}
@end
